package com.gdut.simple.data.remote;


import com.gdut.simple.common.RequestCallback;
import com.gdut.simple.data.BasicRepository;
import com.gdut.simple.data.entity.Gank;
import com.gdut.simple.data.entity.News;
import com.gdut.simple.data.remote.http.service.impl.GankApiService;
import com.gdut.simple.data.remote.http.service.impl.HotPickApiService;
import com.gdut.simple.data.remote.http.service.impl.NewsApiService;

import java.util.List;

public class RemoteRepository extends BasicRepository {

    public static void getNews(String type, int page, int num, final RequestCallback<List<News>> callback) {
        NewsApiService.getNews(type, page, num, callback);
    }

    public static void getGankList(String type, int num, int page, final RequestCallback<List<Gank>> callback) {
        GankApiService.getGankList(type, num, page, callback);
    }

    public static void getHotPicks(int num, int page, RequestCallback<List<News>> callback) {
        HotPickApiService.getHotPicks(num, page, callback);
    }

    public static void queryHotPicksFromSrc(String src, int num, int page, RequestCallback<List<News>> callback) {
        HotPickApiService.queryHotPicksFromSrc(src, num, page, callback);
    }

    public static void queryHotPicksByKey(String key, int num, int page, RequestCallback<List<News>> callback) {
        HotPickApiService.queryHotPicksByKey(key, num, page, callback);
    }
}
